﻿
''' <summary>
''' class for a stock information on current marketing-based
''' </summary>
''' <remarks></remarks>
Public Class clsStockInfo
    Public StockID As String
    Public StockName As String 'field 0
    Public TodayOpen As Double
    Public YestodayClose As Double
    Public CurrentPrice As Double
    Public TodayMax As Double
    Public TodayMin As Double 'field 5

    Public RefreshTime As DateTime 'field 30,31

    Public Const FieldNumber As Integer = 8 'total field count,if this class fields change, change this number
    ''' <summary>
    ''' compare if current object is as same as value object
    ''' </summary>
    ''' <param name="value"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Function Compare(ByRef Value As clsStockInfo)
        If StockID <> value.StockID Then Return False
        If StockName <> value.StockName Then Return False
        If TodayOpen <> value.TodayOpen Then Return False
        If YestodayClose <> value.YestodayClose Then Return False
        If CurrentPrice <> value.CurrentPrice Then Return False
        If TodayMax <> value.TodayMax Then Return False
        If TodayMin <> value.TodayMin Then Return False
        If RefreshTime <> value.RefreshTime Then Return False

        Return True
    End Function
End Class